package com.zyy.strategy;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @Description: 类描述
 * @Author: zyy
 * @Date: 2023/08/09 17:29
 */
public class Test {
    public static void main(String[] args) {
        Integer[] data = {12, 2, 3, 2, 4, 5, 1};
        Arrays.sort(data, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return o1 - o2;
            }
        });
        System.out.println(Arrays.toString(data));
    }
}
